package linestrategy

import (
	"codejy/analysis/lineanalysis"
	"codejy/structdef"
	"fmt"
	"os"
)

// 定义策略
type ExitStrategy struct{}

// // 注册策略
func init() {
	RegisterStrategy(&ExitStrategy{})
}

// 判断
func (f *ExitStrategy) getId() int {
	return lineanalysis.EXIT
}

func (f *ExitStrategy) Execute(threadStore *structdef.ThreadStore) {
	fmt.Println("程序退出")
	os.Exit(1) //退出程序
}
